<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>OAuth2认证服务 - 首页</title>
    <link rel="stylesheet"
          href="../static/assets/bootstrap/css/bootstrap.min.css"
          th:href="@{/assets/bootstrap/css/bootstrap.min.css}" />
    <link rel="stylesheet" 
          href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" 
          integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" 
          crossorigin="anonymous" referrerpolicy="no-referrer" />
    <style>
        body {
            background-image: url('/bgimages/e7e619d5e087b8e1913c619881246800.jpeg');
            background-size: cover;
            background-position: center;
            background-attachment: fixed;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        
        .header {
            background-color: rgba(78, 115, 223, 0.9);
            color: white;
            padding: 15px 0;
            box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
        }
        
        .main-content {
            flex: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px 0;
        }
        
        .welcome-card {
            background-color: rgba(255, 255, 255, 0.95);
            border-radius: 10px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            padding: 30px;
            max-width: 500px;
            width: 100%;
            text-align: center;
        }
        
        .user-avatar {
            width: 80px;
            height: 80px;
            border-radius: 50%;
            background-color: #e9ecef;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 15px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            border: 3px solid white;
        }
        
        .user-avatar i {
            font-size: 36px;
            color: #4e73df;
        }
        
        .btn-action {
            border-radius: 50px;
            padding: 10px 25px;
            font-weight: 500;
            transition: all 0.3s;
            margin: 5px;
        }
        
        .btn-primary {
            background-color: #4e73df;
            border-color: #4e73df;
        }
        
        .btn-primary:hover {
            background-color: #3756a4;
            border-color: #3756a4;
            transform: translateY(-2px);
            box-shadow: 0 5px 15px rgba(78, 115, 223, 0.4);
        }
        
        .btn-outline {
            border: 1px solid #4e73df;
            color: #4e73df;
            background-color: transparent;
        }
        
        .btn-outline:hover {
            background-color: #4e73df;
            color: white;
        }
        
        .footer {
            background-color: rgba(241, 243, 249, 0.9);
            padding: 15px 0;
            text-align: center;
            font-size: 14px;
            color: #6c757d;
        }
    </style>
</head>
<body>
    <!-- 顶部导航栏 -->
    <header class="header">
        <div class="container">
            <div class="row align-items-center">
                <div class="col-md-6">
                    <h4><i class="fas fa-shield-alt mr-2"></i> OAuth2认证服务</h4>
                </div>
                <div class="col-md-6 text-md-right">
                    <form th:action="@{/logout}" method="post" class="d-inline">
                        <button type="submit" class="btn btn-light btn-sm">
                            <i class="fas fa-sign-out-alt mr-1"></i> 退出登录
                        </button>
                    </form>
                </div>
            </div>
        </div>
    </header>

    <!-- 主要内容 -->
    <div class="main-content">
        <div class="container">
            <div class="welcome-card">
                <div class="user-avatar">
                    <i class="fas fa-user"></i>
                </div>
                <h3 class="mt-3">欢迎，<span th:text="${username}">用户</span>！</h3>
                <p class="text-muted">您已成功登录到OAuth2认证服务系统</p>
                
                <div class="mt-4">
                    <a href="/user/profile" class="btn btn-primary btn-action">
                        <i class="fas fa-user-edit mr-1"></i> 个人资料
                    </a>
                    <a href="/profile-image" class="btn btn-outline btn-action">
                        <i class="fas fa-image mr-1"></i> 查看附件图片
                    </a>
                </div>
            </div>
        </div>
    </div>
    
    <!-- 页脚 -->
    <footer class="footer">
        <div class="container">
            <p class="mb-0">OAuth2认证服务 &copy; 2025 版权所有</p>
        </div>
    </footer>

    <script src="../static/assets/jquery.min.js"
            th:src="@{/assets/jquery.min.js}"></script>
    <script src="../static/assets/bootstrap/js/bootstrap.min.js"
            th:src="@{/assets/bootstrap/js/bootstrap.min.js}"></script>
</body>
</html>